import request from '@/utils/request'

// 根据巡检类型分组查询所有巡检计划表
export const patrolPlan = (patrolMonth) => {
  console.log()
  return request({
    url: `/opermgt/patrolPlan/findAllGroupByPatrolType/?patrolMonth=${patrolMonth}`,
    method: 'GET'
  })
}
// //添加巡检类型
// export const addType = (params) => {
//   return request({
//     url: '/opermgt/patrolPlan/savePatrolType',
//     method: 'POST',
//     data: params
//   })
// }
//查询所有巡检类型
export const allType = () => {
  return request({
    url: '/opermgt/patrolPlan/findAllPatrolType',
    method: 'GET'
  })
}
//查询所有仓库类型
export const allhouser = () => {
  return request({
    url: '/opermgt/universalMethod/getStorehouserList',
    method: 'GET'
  })
}
//查询所有管廊类型
export const allPipe = () => {
  return request({
    url: '/opermgt/universalMethod/getPipeInfoList',
    method: 'GET'
  })
}
//查询所有分区类型
export const allSubregion = () => {
  return request({
    url: '/opermgt/universalMethod/getSubregionInfoList',
    method: 'GET'
  })
}
//查询所有巡检点类型
export const allPointType = () => {
  return request({
    url: '/opermgt/patrolPlan/findAllPatrolPointType',
    method: 'GET'
  })
}
//查询所有巡检点位置
export const allPosition = () => {
  return request({
    url: '/opermgt/patrolPoint/findAll',
    method: 'GET'
  })
}
//根据巡检点位置查询所有巡检点
export const allPoint = (params) => {
  // console.log('paramsparams', params)
  return request({
    url: '/opermgt/patrolPlan/searchAllPatrolPoint',
    method: 'POST',
    data: params
  })
}
//巡检计划表保存
export const scheduleSave = (data) => {
  return request({
    url: '/opermgt/patrolPlan',
    method: 'POST',
    data
  })
}
//添加巡检类型
export const addPatrolType = (data) => {
  return request({
    url: '/opermgt/patrolPlan/addPatrolType',
    method: 'POST',
    data
  })
}
//根据巡检类型删除巡检计划表
